package com.example.springbootdemo.service;

import org.apache.rocketmq.client.apis.ClientException;
import org.apache.rocketmq.client.apis.ClientServiceProvider;
import org.apache.rocketmq.client.apis.message.Message;
import org.apache.rocketmq.client.apis.producer.Producer;
import org.apache.rocketmq.client.apis.producer.SendReceipt;
import org.apache.rocketmq.client.java.example.ProducerNormalMessageExample;
import org.apache.rocketmq.client.java.example.ProducerSingleton;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.nio.charset.StandardCharsets;

/**
 * @ClassName: RocketMQHandelService
 * @Description:
 * @Author: TXW
 * @Date: 2025/7/22
 */

public interface RocketMQHandelService {

    //普通消息
    public  void sendNormalMessage(String topic, String tag, String messageContent,String[] keys);

    //顺序消息
    public  void sendOrderMessage(String topic, String tag, String messageContent,String[] keys,String orderGroupId);

    //事务消息
    public  void sendTransactionMessage(String topic, String tag, String messageContent,String[] keys);

    //延时消息
    public  void sendDelayMessage(String topic, String tag, String messageContent,String[] keys,Long delayTime);

    // Close the producer when you don't need it anymore.
    // You could close it manually or add this into the JVM shutdown hook.
    // producer.close();
}
